package top.aicats.pattern.delegate.simpleDelegate;

import java.util.HashMap;
import java.util.Map;

public class Leader {
    private Map<String, IEmployee> mapEmployee = new HashMap<String, IEmployee>();

    public Leader() {
        mapEmployee.put("saodi", new EmployeeA());
        mapEmployee.put("mozhuozi", new EmployeeB());
    }

    public void command(String command) {
        mapEmployee.get(command).doing(command);
    }
}
